package com.loeng.module.infra.controller.admin.job.vo.job;

import com.loeng.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static com.loeng.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 定时任务分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class JobPageReqVO extends PageParam {

    @Schema(description = "任务名称", example = "李四")
    private String name;

    @Schema(description = "任务状态", example = "1")
    private Integer status;

    @Schema(description = "处理器的名字", example = "张三")
    private String handlerName;

    @Schema(description = "处理器的参数")
    private String handlerParam;

    @Schema(description = "CRON 表达式")
    private String cronExpression;

    @Schema(description = "重试次数", example = "13118")
    private Integer retryCount;

    @Schema(description = "重试间隔")
    private Integer retryInterval;

    @Schema(description = "监控超时时间")
    private Integer monitorTimeout;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

}